{{ content() }}
<section id="main">

    <div class="actions" style="margin: 20px auto; width: 1000px">
        {{form('id':'adminForm')}}
        <div>
            <select name="action" id="action">
                <option selected="selected">Tác vụ</option>
                <option value="trash">Xóa</option>
            </select>        
            <span class="button action"><a name="" id="actionbtn" style="color:#666">Áp dụng</a></span>
            {{form.render('state')}}
            {{form.render('time')}}
            <button class="button">Lọc</button>
            <div class="search">
                {{form.render('text')}} 
                <button class="button">Search Composer</button>
            </div>
        </div>
        <div class="fright_pagination">
            {{form.render('page')}}
            {{form.render('limit',['onchange':'adminForm.submit()'])}}
            {{form.render('orderby')}}
            {{elements.paginator(supports,'adminForm')}}
        </div>
        {{endform()}}
    </div>

    <article class="manage_contact module">
        <header>
            <h3 class="tabs_involved">Quản lý liên hệ</h3>                       
        </header>

        <div class="tab_container">
            <div class="tab_content">
                <table class="tablesorter" cellspacing="0"> 
                    <thead> 
                        <tr> 
                            <th style="width: 20px"></th> 
                            <th style="min-width:100px;">Composer</th>
                            <th>Email</th>
                            <th style="max-width:500px">Content</th> 
                            <th style="min-width:100px;">Time</th>                                 
                            <th style="min-width: 100px">Reply </th> 
                            <th style="min-width: 80px">Action</th> 
                        </tr>                       
                    </thead> 
                    <tbody>
                        {% for support in supports.items %}
                        {%if support.resolved %}
                        <tr class="">
                            {%else %}
                        <tr class="resolved">
                            {%endif%}
                            <td><input class="item" type="checkbox"  data-id="{{support.id}}" name="checkbox[]"></td> 
                            <td>{{support.name}}</td> 
                            <td>{{support.email}}</td>     
                            <td>{{support.content}}</td> 
                            <td>{{support.created}}</td> 
                            <td>{% if support.resolved %}
                                {{'Đã trả lời'}}
                                {% else %}
                                {{'Chưa trả lời'}}
                                {% endif %}
                            </td> 
                            <td id="four"><input class="editbtn" data-id="{{support.id}}" type="image" src="{{url('css/admin/images/icn_edit.png')}}" title="Trả lời">
                                <input class="deletebtn" data-id="{{support.id}}" type="image" src="{{url('css/admin/images/icn_trash.png')}}" title="Xóa"></td> 
                        </tr> 
                        <tr class="reply" id="reply-{{support.id}}" style="display: none">
                            <td colspan="6">
                                <div class="reply_contact_title" >Trả lời phản hồi</div>
                                <div class="contact_content"> <textarea class="wp-editor-area" name="replycontent" id="replycontent-{{support.id}}"></textarea></div>
                                <input type="submit" name="" data-id="{{support.id}}" class="submitbtn" value="Trả lời">
                                <input type="submit" name="" id="" class="cancelbtn" value="Hủy">
                            </td>
                        </tr>
                        {% endfor %}
                    </tbody> 
                </table>
            </div><!-- end of #tab1 -->
        </div><!-- end of .tab_container -->
    </article><!-- end of content manager article --> 
    <div id="dialog" title="Basic dialog" style="display: none;">
    </div>
</section>
{{javascript_include('js/admin/supports.js')}}

